package com.example.shortestpathalgorithm44;

import org.junit.Test;

/**
 * @description
 * @auther lijiewei
 * @date 2022/7/13 17:18
 */
public class DijkstraAlgorithmTest {

    @Test
    public void dijkstraAlgorithmTest() throws Exception{

        Graph graph = new Graph(6);
        graph.addEdge(0,1, 10);
        graph.addEdge(0,4, 15);
        graph.addEdge(1,2, 15);
        graph.addEdge(1,3, 2);
        graph.addEdge(2,5, 5);
        graph.addEdge(3,2, 1);
        graph.addEdge(3,5, 12);
        graph.addEdge(4,5, 10);
        System.out.println("s->t表示，s节点到t节点");

        DijkstraAlgorithm dijkstraAlgorithm = new DijkstraAlgorithm();
        dijkstraAlgorithm.dijkstra(graph, 0, 5);
    }
}
